<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 性感周周
  Date: 2021/11/29
  Time: 9:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="js/fileupload.js"></script>
    <script src="bootstrap-4.6.0-dist/js/bootstrap.min.js"></script>
    <script src="My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" href="bootstrap-4.6.0-dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-2">
           <jsp:include page="/layout/left.jsp"></jsp:include>
        </div>
        <div class="col-sm-10">
            <form action="list.do" method="post">
                发布时间: <input type="text" name="createdatex" value="${createdatex}">
                ------<input type="text" name="createdated" value="${createdated}"> <br>
                制图文件: <input type="text" name="pic" value="${pic}">
                制作人: <input type="text" name="zzname" value="${zzname}">
                审核人: <input type="text" name="shenhe" value="${shenhe}"> <br>
                主版本号: <input type="text" name="typezx" value="${typezx}">
                ------ <input type="text" name="typezd" value="${typezd}"> <br>
                从版本号: <input type="text" name="typecx" value="${typecx}">
                -------<input type="text" name="typecd" value="${typecd}"><br>
                <a href="javaScript:ooo('createdate')">发布时间</a>
                <a href="javaScript:ooo('typez')">主版本号</a>
                <a href="javaScript:ooo('typec')">从版本号</a>
                <input type="hidden" name="ordername" id="ordername">
                <input type="submit" value="查询">
            </form>
            <table class="table table-hover table-bordered table-primary">
                <tr>
                    <td>发布时间</td>
                    <td>品牌</td>
                    <td>品类</td>
                    <td>产品编号</td>
                    <td>主版本号</td>
                    <td>从版本号</td>
                    <td>制图文件</td>
                    <td>总用量</td>
                    <td>制作人</td>
                    <td>审核人</td>
                    <td>备注</td>
                </tr>
                <c:forEach items="${list}" var="s">
                    <tr>
                        <td>${s.createdate}</td>
                        <td>${s.name}</td>
                        <td>${s.leibie}</td>
                        <td>${s.cpbh}</td>
                        <td>${s.typez}</td>
                        <td>${s.typec}</td>
                        <td>${s.pic}</td>
                        <td>${s.ddnums}</td>
                        <td>${s.zzname}</td>
                        <td>${s.shenhe}</td>
                        <td>${s.beizhus}</td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="15">
                        <nav aria-label="Page navigation example">
                            <ul class="pagination">
                                <li class="page-item"><a class="page-link" href="javaScript:go(1)">First</a></li>
                                <li class="page-item"><a class="page-link" href="javaScript:go(${page.getPageNum()}-1)">Previous</a></li>
                                <li class="page-item"><a class="page-link" href="#">${page.getPageNum()}/${page.getPages()}</a></li>
                                <li class="page-item"><a class="page-link" href="javaScript:go(${page.getPageNum()}+1)">Next</a></li>
                                <li class="page-item"><a class="page-link" href="javaScript:go(${page.getPages()})">Last</a></li>
                            </ul>
                        </nav>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
<script>
    function go(pageNum) {
    location="list.do?pageNum="+pageNum+"&"+$("form").serialize();
    }
    function ooo(ordername) {
        $("#ordername").val(ordername);
        $("form").submit();
    }
</script>
</html>
